#include<iostream>
#include<unistd.h>
#include<stdlib.h>
#include<stdio.h>
#include<fcntl.h>
#include<sys/types.h>
#include<sys/stat.h>


int main(int argc, char *argv[]){
  if(argc != 2) exit(1);
  int fd = open(argv[1], O_RDONLY);
  if(fd < 0) exit(1);
  dup2(fd, 0);
  close(fd);
  while(1)
  {
    char buffer[64];
    if(!fgets(buffer, sizeof(buffer), stdin)) break;
    printf("%s", buffer);
  }
  return 0;
}
